<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd ">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<style type="text/css">
body {
	background-image:
		url("#{request.contextPath}/resources/images/light-tile.gif");
}
</style>
	<title>Cadastre-se</title>
</h:head>
<h:body>
	<p:growl id="messages" sticky="true" />
	<p:dialog header="Cadastro Administrador" visible="true" closable="false"
		draggable="false" resizable="false" width="600">
		<h:form method="post">
			<h:panelGrid columns="2">
				<h:outputLabel value="Nome: " />
				<p:inputText size="40" value="#{cadastroBean.usuario.nome}"
					required="true"
					requiredMessage="Nome é obrigatório" />

				<h:outputLabel value="Email: " />
				<p:inputText size="40" value="#{cadastroBean.usuario.email}"
					required="true" requiredMessage="Email é obrigatório" />

				<h:outputLabel value="Senha: " />
				<p:password value="#{cadastroBean.senha}" required="true"
					requiredMessage="Senha é obrigatória" />

				<h:outputLabel value="Confirme sua Senha: " />
				<p:password value="#{cadastroBean.confirmaSenha}" required="true"
					requiredMessage="Confirmação de senha é obrigatória" />

			</h:panelGrid>
			<h:panelGrid columns="2">
				<h:commandButton value="Enviar" update=":messages" type="submit"
					actionListener="#{cadastroBean.gravaAluno}" />
				<h:commandButton value="Desativar Conta"
					rendered="#{cadastroBean.atualizando}"
					onclick="confirmation.show()" />
			</h:panelGrid>
		</h:form>
	</p:dialog>
</h:body>
</html>
